<?php

namespace App\Models;
use Illuminate\Database\Eloquent\Model;

class Comment extends Model
{
    protected $guarded = [];
    protected $dateFormat = 'U';
    public function setPiclistAttribute($pictures)
    {
        if (is_array($pictures)) {
            $this->attributes['Piclist'] = json_encode($pictures);
        }
    }

    public function getPiclistAttribute($pictures)
    {
        return json_decode($pictures, true);
    }

}
